Split image id into component values.

        Example: SUSE:SLES:12-SP3:2018.01.04
                 Publisher:Offer:Sku:Version

        Raises:
            If image_id is not a valid format.
336919
def _process_image_id(self):
        
        try:
            image_info = self.image_id.strip().split(':')
            self.image_publisher = image_info[0]
            self.image_offer = image_info[1]
            self.image_sku = image_info[2]
            self.image_version = image_info[3]
        except Exception:
            self.image_publisher = None
1145898
def build_from_id(id)
      @image = ::Docker::Image.get(id)
      add_repository_tag
    rescue ::Docker::Error::NotFoundError
      @image = ::Docker::Image.create('fromImage' => id)
      add_repository_tag
    rescue ::Docker::Error::DockerError => e
      DockerExceptionParser.new(e)
    end
924645
def get_image(self, id):
        """"""
        url = self._base_url + "/3/image/{0}".format(id)
        resp = self._send_request(url)
        return Image(resp, self)
1191463
def split_segment_ids(segment_ids):
    """"""
    
    def split_segment_id(segment_id):
        temp = segment_id.split(':')
        if len(temp) == 2:
            temp.append(None)
        elif temp[2] == '*':
            temp[2] = None
        else:
            temp[2] = int(temp[2])
            
        return temp

    return map(split_segment_id, segment_ids)
1090791
def is_valid_image_extension(file_path):
    """"""
    valid_extensions = ['.jpeg', '.jpg', '.gif', '.png']
    _, extension = os.path.splitext(file_path)
    return extension.lower() in valid_extensions
381389
def get_formats(self, id, **data):
        
        
        return self.get("/formats/{0}/".format(id), data=data)
538257
def id_a_to_s id_a
      id_a.map do |el|
         proc_ids = process_ids(el)
         proc_ids
      end.compact.join(",")
    end
398959
function SplitIndex(s) {
        var spl = s.split(spDelim);
        this.id = spl[0];
        this.value = spl[1];
    }
746853
def _split_identifier(self, identifier):
        """"""
        try:
            name, subscript = identifier.split("_", 1)
        except (TypeError, ValueError, AttributeError):
            name = identifier
            subscript = ''
        return self._render_str(name), self._render_str(subscript)
43628
def _parse_image_name(self, image):
        
        if ':' in image and '/' not in image.split(':')[-1]:
            image_tag = image.split(':')[-1]
            image_name = image[:-(len(image_tag) + 1)]
        else:
            image_tag = "latest"
            image_name = image

        return (image_name, image_tag)
503845
IdComponents splitId(String id) throws IndexOutOfBoundsException
   {
      String[] membershipIDs = id.split(",");

      String groupNodeId = membershipIDs[0];
      String userName = membershipIDs[1];
      String type = membershipIDs[2];

      return new IdComponents(groupNodeId, userName, type);
   }
667265
def catalog_object_id=(catalog_object_id)

      if !catalog_object_id.nil? && catalog_object_id.to_s.length > 192
        fail ArgumentError, "invalid value for 'catalog_object_id', the character length must be smaller than or equal to 192."
      end

      @catalog_object_id = catalog_object_id
    end
540642
def is_img_id_valid(img_id):
    
    t = re.sub(r'[^a-z0-9_:\-\.]', '', img_id, re.IGNORECASE)
    t = re.sub(r'\.+', '.', t)
    if img_id != t or img_id.count(':') != 1:
        return False
    profile, base_name = img_id.split(':', 1)
    if not profile or not base_name:
        return False
    try:
        get_profile_configs(profile)
    except ValueError:
        return False
    return True
1057022
function (version, semverIndex)
	{
		const splittedVersion = version.split('.');
		splittedVersion[ semverIndex ] = parseInt(splittedVersion[ semverIndex ], 10) + 1;
		while (semverIndex < 2)
		{
			splittedVersion[ ++semverIndex ] = '0';
		}
		return splittedVersion.join('.');
	}
1134361
function parseId( id ) {
        var segs = id.split( '!' );

        if ( MODULE_ID_REG.test( segs[ 0 ] ) ) {
            return {
                module   : segs[ 0 ],
                resource : segs[ 1 ]
            };
        }

        return null;
    }
399493
def image_by_id(self, id):
        
        if not id:
            return None
        return next((image for image in self.images() if image['Id'] == id),
                    None)
167554
def image_to_osd(image,
                 lang='osd',
                 config='',
                 nice=0,
                 output_type=Output.STRING):
    '''
    
    '''
    config = '{}-psm 0 {}'.format(
        '' if get_tesseract_version() < '3.05' else '-',
        config.strip()
    ).strip()
    args = [image, 'osd', lang, config, nice]

    return {
        Output.BYTES: lambda: run_and_get_output(*(args + [True])),
        Output.DICT: lambda: osd_to_dict(run_and_get_output(*args)),
        Output.STRING: lambda: run_and_get_output(*args),
    }[output_type]()