'return yaml file'

def load(self, content_type='yaml'):

    contents = self.read()
    if ((not contents) and (not self.content)):
        return None
    if self.content:
        if isinstance(self.content, dict):
            self.yaml_dict = self.content
            return self.yaml_dict
        elif isinstance(self.content, str):
            contents = self.content
    try:
        if ((content_type == 'yaml') and contents):
            try:
                self.yaml_dict.fa.set_block_style()
            except AttributeError:
                pass
            try:
                self.yaml_dict = yaml.safe_load(contents, yaml.RoundTripLoader)
            except AttributeError:
                self.yaml_dict = yaml.safe_load(contents)
            try:
                self.yaml_dict.fa.set_block_style()
            except AttributeError:
                pass
        elif ((content_type == 'json') and contents):
            self.yaml_dict = json.loads(contents)
    except yaml.YAMLError as err:
        raise YeditException('Problem    with    loading    yaml    file.    {}'.format(err))
    return self.yaml_dict
